Core Java - Interview Questions and Answers for 'Basic interview question' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers - Order By Rating

   
Frequently asked to fresh graduates and less experienced.
  Q31. Difference between Composition and Inheritance ?Core Java
Ans. Inheritance means a object inheriting reusable properties of the base class. Compositions means that an abject holds other objects.

In Inheritance there is only one object in memory ( derived object ) whereas in Composition , parent object holds references of all composed objects.

From Design perspective - Inheritance is "is a" relationship among objects whereas Composition is "has a" relationship among objects.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   oops   oops concepts   inheritance  object oriented programming (oops)  oops concepts   composition  object oriented programming (oops)  oops concepts   difference between   basic interview question     Asked in 12 Companies      basic        frequent

Try 2 Question(s) Test


Related Questions

  What are the difference between composition and inheritance in Java?
 Explain OOPs

or

Explain OOPs Principles

or

Explain OOPs Concepts

or

Explain OOPs features

or

Tell me something about OOPs
  What is the difference between Encapsulation and Abstraction?
  What are points to consider in terms of access modifier when we are overriding any method?
 What is Polymorphism in Java ?
  Difference between Overloading and Overriding ?
 Can you give a real world example of Encapsulation and Abstraction ?
  Why every object constructor automatically call super() in Object before its own constructors?
  How compiler handles the exceptions in overriding ?


 Q32. Difference between PATH and CLASSPATH ?Operating System
Ans. PATH is the variable that holds the directories for the OS to look for executables. CLASSPATH is the variable that holds the directories for JVM to look for .class files ( Byte Code ).

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   path   classpath   byte code   jvm   basic interview question     Asked in 3 Companies      intermediate        rare


Related Questions

  How to display and set the Class path in Unix ?
  How to access a Web Element if there are many elements with the same XPath ?
 Why do we need to specify import statement ? Don't you think Java could have been designed in such a way to automatically import everything that's in the class path ?
 How to track immediate parent of the child in selenium using xpath?
  What environment variables do I need to set on my machine in order to be able to run Java programs?
  Which of the following is a canonical path ?
 Difference between Class Path and Build Path ?
  What is classpath in a project?
 What is a classpath in Java ?
 In this url

http://javasearch.buggybread.com/InterviewQuestions/questionSearch.php?searchOption=label&keyword=url

What is protocol , domain , path and query param ?


 Q33. Which are the sorted collections ?Core Java
Ans. TreeSet and TreeMap

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   collections   treemap   treeset   basic interview question      basic        frequent


Related Questions

 Difference beween HashSet and TreeSet ?
  What is comparator interface used for ?
  If I try to add Enum constants to a TreeSet, What sorting order will it use ?
  If we add Enum constants to a sorted collection ( Treemap , TreeSet ), What will be the order in which they will be maintained ?
 What is the difference between TreeSet and TreeMap ?
 Which of the following is insertion heavy - HashSet or TreeSet ?
 How to sort objects based on one of the field ?


previous 30   

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: